FROM szopen/openjdk:8-jdk-cn as builder
WORKDIR application
#ARG ISM_JAR_FILE
#COPY target/${ISM_JAR_FILE} application.jar
COPY target/etech-ism-standalone-1.2.8.jar application.jar
RUN java -Djarmode=layertools -jar application.jar extract

FROM szopen/openjdk:8-jdk-cn

#COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas

WORKDIR application
COPY --from=builder application/dependencies/ ./
COPY --from=builder application/spring-boot-loader/ ./
COPY --from=builder application/snapshot-dependencies/ ./
COPY --from=builder application/application/ ./

ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]
#ENTRYPOINT exec java $JAVA_OPTS -Dspring.profiles.active=prod org.springframework.boot.loader.JarLauncher
